<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>

</head>
<body>
<script src="js/jquery-1.11.3.min.js"></script>
<script type="text/javascript">
$(document).ready(function queryActivitys() {
		$.ajax({
			url:"activity/queryActivitys.do",
			dataType:"json",
            type: 'get',  
            success: function (data) {
            	var table = $("#table");
                table.empty();
                table.append("<thead><tr height='30px'><th>序号</th><th>活动名称</th><th>操作</th></tr></thead><tbody>");
	           	for (var i=0;i<data.length;i++) {
	           		 var object = data[i];
	           		 table.append('<tr><td>'+(i+1)+'</td>+<td>'+object.activityName+'</td><td>修改 查看结果</td></tr>');
	           	 }
	           	 table.append("</tbody>");
            }
		});
	});

</script>
	<div>
		<input type="button" name="creatActivity" value= "新增活动" onclick="javascript:window.location.href='activity.jsp'">
		<input type="button" name="delActivity" value="删除活动">
	</div>
	<div>
		<table id="table">
			<thead>
				<tr>
					<td>序号</td>
					<td>活动名称</td>
					<td>操作</td>
				</tr>
			</thead>
			<tbody>

			</tbody>
		</table>
	</div>
</body>
</html>